﻿<?php $this->load->view('layout/header'); ?>
    
<div>
</div>
    <div id="container">
        <!--查询表单开始-->
        <div id="DivQuery">
            <div id="floatBoxBg" style="filter: alpha(opacity=0); opacity: 0;">
            </div>
            <div id="floatBox" class="floatBox">
                <div id="drag" class="title" onmousedown="DragDialog()">
                    <h4>
                        查询</h4>
                    <span>关闭</span></div>
                <div class="content">
                    <form action="<?php echo b_url('config/limit')?>" method='post' >
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_query">
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                字段名称：
                            </td>
                            <td>
                                <input name="limitfield" type="text" id="txtLimitField" />
                            </td>
                            <td style="width: 15%" align="right">
                                状态：
                            </td>
                            <td>
                                <span id="radIsClose">
                                    <input id="radIsClose_0" type="radio" name="isclose" value="" checked="checked" /><label for="radIsClose_0">不限</label>
                                    <input id="radIsClose_1" type="radio" name="isclose" value="0" /><label for="radIsClose_1">开放</label>
                                    <input id="radIsClose_2" type="radio" name="isclose" value="1" /><label for="radIsClose_2">关闭</label>
                                </span>
                            </td>
                        </tr>
                        <tr class="table_query_btn">
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                                <input type="submit" name="btnQuery" value="查询" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnQuery&quot;, &quot;&quot;, false, &quot;&quot;, &quot;Limit.aspx?ParentID=0&quot;, false, false))" id="btnQuery" />
                                <input type="button" value="返回" onclick="javascript:HiddenSearchDialog();" />
                            </td>
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    </form>
                </div>
            </div>
        </div>
        <!--查询表单结束-->
        <!--导航开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_nav">
            <tr>
                <td>
                    权限字段&gt;管理列表(
                    <span id="lblNav">根结点</span>
                    <?php
                        $last_parentid = 0;
                        foreach ($node_list as $k => $v) {
                            echo ' > ' . $v['limitfield'] . '  ';
                            $last_parentid =$v['parentid'];
                        }
                    ?>
                    )
                </td>
            </tr>
        </table>
        <!--导航结束-->
        <!--操作选项开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_op">
            <tr>
                <td>
                    操作选项：
                    <a id="lbtnAdd" href="<?php echo b_url('config/limit_add?parentid=').$limitid;?>">添加权限字段</a>
                    <a onclick="javascript:return checkEdit(this);" name="limitid" src="<?php echo b_url('config/limit_add').$geturl.'/';?>" id="lbtnEdit" href="javascript:;)">修改权限字段</a>
                    <a onclick="javascript:return checkEdit(this);" name="limitid" src="<?php echo b_url('config/move/')?>" id="lbtnMove" href="javascript:;">移动权限字段</a>
                    <a onclick="javascript:return checkDel(this);" name="limitid" src="<?php echo b_url('config/delete_info/limit/limitid/limit/')?>" id="lbtnDel" href="javascript:;">删除权限字段</a>
                    <a onclick="javascript:return checkOperate(this);" name="limitid" href="javascript:;" src="<?php echo b_url('config/edit_close/limit/limitid/limit/0/')?>">批量开放</a>
                    <a onclick="javascript:return checkOperate(this);" name="limitid" href="javascript:;" src="<?php echo b_url('config/edit_close/limit/limitid/limit/1/')?>">批量关闭</a>
                    <a href="javascript:SearchDialog()">查询权限字段</a>
                    <a id="lbtnGoBack" href="<?php echo b_url('config/limit?parentid=').$last_parentid;?>">返回上级</a>
                </td>
            </tr>
        </table>
        <!--操作选项结束-->
        <!--列表开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list" id="TbList">
            <tr class="table_list_title">
                <td style="width: 2%">
                    <input type="checkbox" name="checkbox" value="checkbox" onclick="javascript:checkAll(this,'limitid')" />
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=LimitID&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    编号
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=LimitField&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    权限字段名称
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=LimitValue&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    权限字段值
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ChildNum&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    子级数
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ListID&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    排序号
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AdminID&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    创建人
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    创建时间
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=IsClose&AscDesc=desc&ParentID=0&txtLimitField=&radIsClose=-1&page=1')" title="点击排序">
                    状态
                </td>
                <td style="width: 10%">
                    操作
                </td>
            </tr>
                <?php foreach($list as $k=>$v) : ?>
                    <tr class="table_list_row_normal">
                        <td style="width: 2%">
                            <input name="limitid" type="checkbox" id="LimitID" value="<?php echo $v['limitid']?>" onclick="javascript:TrColor2('LimitID',1)" />
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <?php echo $v['limitid']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <a href="<?php echo b_url('config/limit_add/').$v['limitid'].$geturl;?>"><?php echo $v['limitfield']?></a>
                            <?php if($v['isdist'] == 0): ?>
                            <span style="color:red"> |分</span>
                            <?php endif;?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <?php echo $v['limitvalue']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <?php echo $v['childnum']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <?php echo $v['listid']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <?php echo $v['adminname']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <?php echo $v['addtime']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('LimitID',1)">
                            <?php 
                                if($v['isclose'] == 0){
                                    echo '开放';
                                }elseif($v['isclose'] == 1){
                                    echo '<font color="red">关闭</font>';
                                }
                            ?>
                        </td>
                        <td style="width: 10%">
                            <a href="<?php echo b_url('config/limit').'?parentid='.$v['limitid'];?>">进入子权限</a>
                        </td>
                    </tr>
                <?php endforeach ; ?>
        </table>
        <!--列表结束-->
        <!--分页开始-->
        <?php $pagination->show();?>
        <!--分页结束-->
        <div class="note">
            注:<br>
            1.此处的权限记录为系统预设定,只可以进行关闭和开放操作<br>
            2.权限关闭后,除超级管理员外,其他管理员将没有对应的权限<br>
        </div>
    </div>
        
<script src="/static/bk/js/table.js" type="text/javascript"></script>
<?php $this->load->view('layout/footer'); ?>

